package cn.kk.pzhu.gpaweb.dao;

import cn.kk.pzhu.gpaweb.entity.Student;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StudentMapper extends BaseMapper<Student> {

    @Select("select DISTINCT cla from student where cla !=\"\"")
    List<String> getClaList();

    @Select("select DISTINCT major from student where major !=\"\"")
    List<String> getMajorList();

    void insertOrUpdateBatch(@Param("list") List<Student> students);
}
